<?php
namespace Home\Controller;

class WxArticleController extends CommonController{
	
// 	public function _initialize(){
// 		header("Content-Type: text/html; charset=utf-8");
// 		$fromuser = I('fromuser');
// 		$customer_id = $this->getCustomerId();
// 		$member = D('Member')->where("fromuser='{$fromuser}' and customer_id='$customer_id'")->find();
// 		$this->assign('member',$member);
// 	}
    
	public function single(){
		$id = intval(I('id'));
		
		$info = D('Common')->where(array('id'=>$id))->find();
		$info['content'] = html_entity_decode($info['content']);
		
		$this->assign("info",$info);
		$this->assign("today",date("Y-m-d"));
		$this->display('index');
    }
    
	public function muti(){
		$id = intval(I('id'));

		$info = D('CommonDetail')->where(array('id'=>$id))->find();
		$info['content'] = html_entity_decode($info['content']);
		
		$this->assign("info",$info);
		$this->assign("today",date("Y-m-d"));
		$this->display('index');
    }
    
    private function getCustomerId(){
    	 
    	return C('CUSTOMER_ID');
    }
}